abstract class A
{
    abstract public void func();

    public void fun() {
        System.out.println("B的方法");
    }

}
class B extends A
{
    @Override
    public void func() {
        System.out.println("B的方法");
    }


}
public class Test {
    public static void main(String[] args) {
        A a=new B();
        a.func();
    }
}
